﻿using System;

namespace OperationPlugins.Proxies
{
    /// <summary>
    /// Proceeds type validations.
    /// </summary>
    public interface ITypeValidator
    {
        /// <summary>
        /// Checks if a proxy can be generated from the specified type.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="message">If this method returns false, contains an error message that describes the reason why the specified type cannot be used.</param>
        /// <returns>true if a proxy can be generated from the specified type, otherwise false.</returns>
        bool IsValid(Type type, out string message);
    }
}
